# $Id: PKGBUILD 73868 2012-07-16 05:51:30Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Maxwell Pray a.k.a. Synthead <synthead@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-font-afm
pkgver=1.20
pkgrel=3
pkgdesc="Parse Adobe Font Metric files"
arch=('any')
url="http://search.cpan.org/dist/Font-AFM"
license=('GPL' 'PerlArtistic')
depends=('perl>=5.5.0')
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Font-AFM-$pkgver.tar.gz")
md5sums=('b14ecf4dc4edbd63940aa354eb13c499')

build() {
  cd "$srcdir/Font-AFM-$pkgver"
  export \
	PERL_MM_USE_DEFAULT=1 \
	PERL_AUTOINSTALL=--skipdeps \
	PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
	PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
	MODULEBUILDRC=/dev/null
  perl Makefile.PL
  make
}

check() {
  cd "$srcdir/Font-AFM-$pkgver"
  make test
}

package() {
  cd "$srcdir/Font-AFM-$pkgver"
  make install
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
